var toString = Object.prototype.toString,
    ua = navigator.userAgent.toLowerCase(),
    check = function (r) {
        return r.test(ua);
    },
    DOC = document,
    docMode = DOC.documentMode,
    isStrict = DOC.compatMode == "CSS1Compat",
    isOpera = check(/opera/),
    isChrome = check(/\bchrome\b/),
    isWebKit = check(/webkit/),
    isSafari = !isChrome && check(/safari/),
    isSafari2 = isSafari && check(/applewebkit\/4/),
    isSafari3 = isSafari && check(/version\/3/),
    isSafari4 = isSafari && check(/version\/4/),
    isIE = !isOpera && check(/msie/),
    isIE7 = isIE && (check(/msie 7/) || docMode == 7),
    isIE8 = isIE && (check(/msie 8/) && docMode != 7),
    isIE6 = isIE && !isIE7 && !isIE8,
    isBlackberry = check(/blackberry/),
    isGecko = !isWebKit && check(/gecko/),
    isGecko2 = isGecko && check(/rv:1\.8/),
    isGecko3 = isGecko && check(/rv:1\.9/),
    isBorderBox = isIE && !isStrict,
    isWindows = check(/windows|win32/),
    isMac = check(/macintosh|mac os x/),
    isAir = check(/adobeair/),
    isLinux = check(/linux/),
    isSecure = /^https/i.test(window.location.protocol);


if ((Ext.is.Phone && (Ext.is.iOS || Ext.is.Android)) || Ext.is.Tablet || isChrome || isSafari) {
    
    Ext.setup({
    	/*
        tabletStartupScreen: 'lib_fe/img/ipad_loading_screen_portrait.png',
        phoneStartupScreen: 'lib_fe/img/iphone_loading_screen.png',
        icon: (Ext.is.Phone) ? 'lib_fe/img/iphone_icon.png' : "lib_fe/img/iPad_icon.png",
        glossOnIcon: false,
        */
    	
        onReady: function () {
        	
				EP.main.mainPanel.show();
        }
    });
} else {
    document.write('Unsupported Browser.');
}